import Vue from 'vue'
import Router from 'vue-router'
const Home = () => import('views/home/home')
const Category = () => import('views/category/Category')
const Cart = () => import('views/cart/Cart')
const Profile = () => import('views/profile/profile')
const Detail = ()=> import('views/detail/Detail')
Vue.use(Router)

const routes = [{
  path: '',
  redirect: '/home'
}, {
  path: '/home',
  component: Home,
  meta:{
    keepAlive:true,
    footShow:true
  }
}, {
  path: '/category',
  component: Category,
  meta:{
    footShow:true
  }
}, {
  path: '/cart',
  component: Cart,
  meta:{
    footShow:true
  }
}, {
  path: '/profile',
  component: Profile,
  meta:{
    footShow:true
  }
}, {
  path:'/detail/:iid',
  component: Detail
}]

export default new Router({
  routes,
  mode: 'history'
})
